package org.example.message_queue.mqserver.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.example.message_queue.mqserver.core.Binding;
import org.example.message_queue.mqserver.core.Exchange;
import org.example.message_queue.mqserver.core.MSGQueue;

import java.util.List;
import java.util.Queue;

@Mapper
public interface MetaMapper {
//      根据三个核心方法创表
    void createExchangeTable();
    void createQueueTable();
    void createBindingTable();

//    针对上述基本概念，进行插入删除
    void insertExchange(Exchange exchange);
    List<Exchange> selectAllExchanges();
    void deleteExchange(String exchangeName);

    void insertQueue(MSGQueue queue);
    List<MSGQueue> selectAllQueues();
    void deleteQueue(String queueName);

    void insertBinding(Binding binding);
    List<Binding> selectAllBindings();
//    void deleteBinding(String bindingName);
    void deleteBinding(Binding binding);
}
